#ifndef QLEARNINGALGORITHM_H
#define QLEARNINGALGORITHM_H


#include <QPoint>
#include "map.h"
#include "animal.h"

class QLearningAlgorithm
{
public:
    QLearningAlgorithm(int mapSize, int nrOfDoors, float gamma);
    ~QLearningAlgorithm();

    double Q(QPoint state, MoveAction action);
    double r(QPoint state, MoveAction action);
    void randomizeAnimalPosition();
    void operator()(int stateX, int stateY, MoveAction action);

private:
    int _gamma;
    //state(X,Y,NrOfDoorsOpen), action
    float**** _qTableValues;
    Map* _m;
    Animal _animal;


};

#endif // QLEARNINGALGORITHM_H
